# !usr/bin/env python
# -*- coding:utf-8 _*-
"""
@Author:张广勤
@Web site: https://www.tunan.wang
@Github:www.github.com
 
@File:worddoc1_0.py
@Time:2024/8/7 20:59

@Motto:不积跬步无以至千里，不积小流无以成江海！
"""

from docx import Document
from docx.shared import Pt
from docx.oxml.ns import qn
from docx.oxml import OxmlElement

doc = Document()

# 创建一个段落
p = doc.add_paragraph('This is a paragraph with ䷀乾	䷁坤	䷂屯	䷃蒙	䷄需	䷅讼	䷆师	䷇比䷈小畜')

# 添加一个运行（Run），并设置为加粗
run = p.add_run('bold text')
run.bold = True

# 保存文档
doc.save('demo_with_bold.docx')

